#include "label.h"
#include <QPaintEvent>
#include <QPixmap>
#include <QPainter>
Label::Label(QString strw,QPixmap p,QLabel *parent) :
    QLabel(parent)
{
    text = strw;
    p_wh = p;
}

Label::~Label()
{

}

void Label::paintEvent(QPaintEvent *event)
{
    event;
    QLabel::paintEvent(event) ;
    QPainter painter(this) ;
    painter.drawText(QPoint(p_wh.width()/4.5,p_wh.height()/1.3),text);
    //    this->setStyleSheet("color:white;font-size:13px;font-weight:bold;border:0px;");
    //    this->setStyleSheet("color:white;font-size:14px;border:0px;");
    //dig1->setStyleSheet("QToolButton{border:1px groove gray;border-radius:5px;font-size:16px;border-style: flat;};");
    this->setStyleSheet("border:1px groove gray;border-radius:5px; font-family:'Microsoft YaHei';color:white; font-size:14px;border-style: flat;");
    return ;
}
